//
//  AppDelegate.m
//  Orchard
//
//  Created by ios001 on 16/8/18.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "AppDelegate.h"
#import "EGTabBarController.h"
#import "ViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    
    
    

    // MARK: - 1.加载标签控制器
    [self setAppStyle];
    
    // 1. 创建窗口
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    
    // 2. 创建标签VC
    EGTabBarController *tabBarVc = [[EGTabBarController alloc] init];
    
    // 3. 设置窗口的rootVc
    self.window.rootViewController = tabBarVc;
//    self.window.rootViewController = [[ViewController alloc] init];
    
    // 4. 将窗口设置为主窗口并可见
    [self.window makeKeyAndVisible];
    
    // MARK: - 2.状态栏的设置
    // 1.显示白色的效果
    application.statusBarStyle = UIStatusBarStyleLightContent;
    // 不要隐藏
    application.statusBarHidden = NO;
    
    return YES;
}

/*
 接口测试代码
 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
 self.window.backgroundColor = [UIColor whiteColor];
 UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[ViewController new]];
 
 self.window.rootViewController = nav;
 [self.window makeKeyAndVisible];
 */

- (void)setAppStyle{
    
    UINavigationBar *nav = [UINavigationBar appearance];
    [nav setTintColor: kThemeColor];
    
    UITabBar *tab = [UITabBar appearance];
    [tab setTintColor: kThemeColor];
    
}



@end
